home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2004 #2 / K-CD-2-2004.ISO / Fire Chief / data1.cab / Program_Executable_Files / Logic / tools / DefVictory.scp < prev    next >
Encoding:
Text File  |  2003-05-28  |  777 b   |  54 lines

  1. s32 CheckStandardVictory()
  2. {
  3.     s32 indice;
  4.     s32 nbcivil;
  5.     s32 vicval;
  6.  
  7.     nbcivil = GetVariable("NBCIVIL"); 
  8.     vicval = 0;
  9.  
  10.     for( indice = 1; indice <= nbcivil; indice += 1 )
  11.     {
  12.         vicval = vicval + GetSaved( GetWorldResident("civil" + indice));
  13.     }
  14.  
  15.     if( vicval == nbcivil )
  16.         return 1;
  17.     else
  18.         return 0;
  19. }
  20.  
  21.  
  22. s32 CheckStandardDefeat()
  23. {
  24.     WORLDRESIDENT wr; 
  25.     s32 indice;
  26.     s32 nbcivil;
  27.  
  28.     if ( TestAllFaints() == 1)
  29.         return 1;
  30.  
  31.     if( Check_ClassicGameOverAll() == 1 )
  32.         return 2;
  33.  
  34.     nbcivil = GetNbCivil(); 
  35.  
  36.     for( indice = 1; indice <= nbcivil; indice += 1 )
  37.     {
  38.         wr = GetWorldResident("civil"+ indice);
  39.         if( GetCurrPDV(wr) == 0.0 )
  40.         {
  41.             ForceConsole(1);    
  42.             PrintConsole("civil"+ indice);
  43.             return 3;
  44.         }
  45.     }
  46.  
  47.  
  48.     return 0;
  49. }
  50.  
  51.  
  52.  
  53.  
  54.